#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

class A
{
public:
	virtual void test(int val = 1)
	{
		cout << "A :" << val << endl;
	}
	virtual void func()
	{
		test();
	}
};

class B : public A
{
public:
	virtual void test(int val = 0)
	{
		cout << "B : " << val << endl;
	}
};

int main()
{
	B* bb = new B;
	bb->func();

	return 0;
}